package lib.quasar.widget.bold;

import android.content.Context;
import android.graphics.Canvas;
import android.support.annotation.Nullable;
import android.support.v7.widget.AppCompatTextView;
import android.util.AttributeSet;

/**
 * description: 字体加粗
 * created by kalu on 2017/5/17 10:30
 */
public final class TextBoldView extends AppCompatTextView {

    public TextBoldView(Context context) {
        this(context, null, 0);
    }

    public TextBoldView(Context context, @Nullable AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public TextBoldView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onDraw(Canvas canvas) {
        setIncludeFontPadding(false);
        getPaint().setFakeBoldText(true);
        super.onDraw(canvas);
    }
}
